<template>
  <div class="shopping">
    <van-checkbox-group v-model="result" ref="checkboxGroup">
      <van-checkbox name="a">复选框 a</van-checkbox>
      <van-checkbox name="b">复选框 b</van-checkbox>
      <van-checkbox name="c">复选框 c</van-checkbox>
    </van-checkbox-group>
    <!-- <van-checkbox v-model="checked"  @click="checkAll">全选</van-checkbox> -->
    <van-submit-bar :price="3050" button-text="提交订单" @submit="onSubmit" class="submit">
      <van-checkbox v-model="checked"  @click="checkAll">全选</van-checkbox>
    </van-submit-bar>
  </div>
</template>

<script>
export default {
  name: 'ShoppingVue',
  data () {
    return {
      result: []
    }
  },
  components: {

  },
  mounted () {

  },
  methods: {
    checkAll () {
      this.$refs.checkboxGroup.toggleAll(true)
    }
  }
}
</script>

<style lang="scss" scoped>
.submit{
  bottom: 50px;
}
</style>
